// const host1 = process.env.NODE_ENV === "production" ? window.location.host : "192.168.0.122:9087";
// const host2 = process.env.NODE_ENV === "production" ? window.location.host : "192.168.0.122:9089";
// const host3 = process.env.NODE_ENV === "production" ? window.location.host : "192.168.0.122:9090";
const host1 = process.env.NODE_ENV === "production" ? window.location.host : "192.168.0.96:9087";
const host2 = process.env.NODE_ENV === "production" ? "cimtech.cn:31140" : "cimtech.cn:31140";
const host3 = process.env.NODE_ENV === "production" ? "cimtech.cn:31141" : "cimtech.cn:31141";
const host4 = process.env.NODE_ENV === "production" ? "cimtech.cn:31142" : "cimtech.cn:31142";
const host5 = process.env.NODE_ENV === "production" ? "cimtech.cn:31118" : "cimtech.cn:31118";

const api = {
	info: `http://${host3}` + "/api/v1/nest/info",
	nestChannel: `ws://${host2}/connect`,
	sysInfo: `ws://${host1}/api/v1/sys/info`,
	error: `http://${host3}/api/v1/nest/mqtt/error`,
	errorIgnore: `http://${host3}/api/v1/nest/mqtt/error/ignore`,
	errorResolve: `http://${host3}/api/v1/nest/mqtt/error/resolve`,
	malfunction: `http://${host3}/api/v1/nest/malfunction`,
	UnmannedAgricultural: `ws://${host4}/connect`,
	Locater: `wss://${host5}/gpsconnector`
};


export default api;
